const formatTime = () => {
    const date = new Date();
    const year = date.getFullYear();
    const mouth = date.getMonth() + 1;
    const day = date.getDate();
    const hour = date.getHours();
    const minute = date.getMinutes();
    const second = date.getSeconds();

    const nowDate = year + "-" + mouth + "-" + day;
    const nowTime = hour + ":" + minute + ":" + second;
    const formatTime = nowDate + " " + nowTime;
    return formatTime;
};

const RETime = (time) => {
    const date = new Date(time);
    const year = date.getFullYear();
    const mouth = date.getMonth() + 1;
    const day = date.getDate();
    const hour = date.getHours();
    const minute = date.getMinutes();
    const second = date.getSeconds();

    const nowDate = year + "-" + mouth + "-" + day;
    const nowTime = hour + ":" + minute + ":" + second;
    const formatTime = nowDate + " " + nowTime;
    return formatTime;
};


export { formatTime, RETime }
